﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;

namespace Janus.NorthwindDemo2007
{
	public class SuppliersFolder : ApplicationFolder
	{

        private const string cFolderName = "Suppliers";
        private const string cFolderDescription = "Nhà cung cấp";
		public SuppliersFolder()
		{
			mFolderName = cFolderName;
            mFolderDescription = cFolderDescription;
			mSupportedFeatures = FolderFeatures.All;
			this.ImageKey = "Suppliers";
            this.mEditImageKey = "EditSupplier";
            this.mNewImageKey = "NewSupplier";

		}

		protected override Type GetTypeOfView(ContentViewType viewType)
		{
			switch (viewType)
			{
				case ContentViewType.GridView:
					return typeof(SuppliersGridEXView);
				default:
					return base.GetTypeOfView(viewType);
			}
		}
		protected override System.Type GetPreviewControlType
		{
			get
			{
				return typeof(SupplierControl);
			}
		}
		protected override DataProvider CreateDataProvider()
		{
			return new SuppliersDataProvider();
		}
        public override bool CanAdd
        {
            get
            {
                return true;
            }
        }
		public override void AddNew()
		{
			SupplierDataForm frmNew = new SupplierDataForm();
			frmNew.Edit(null);
		}
	}

} //end of root namespace